<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ include file="/includes/taglibs.jsp"%>
<%@ taglib uri="/WEB-INF/extremecomponents.tld" prefix="ec"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/common.css" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
    var type = '${type}';
	if(type=='del'){
		alert("此专业里有班级的存在，不可删除！");
	}
	function del(id){
		window.location.href = "deleteDepartment.action?department.id="+id;
	}
	function edit(id){
		window.location.href = "editDepartment.action?department.id="+id;
	}
</script>
</head>
	<body>
		<div id="man_zone">
		
		 <table class="table_style" border="0" align="center"  cellpadding="3" cellspacing="1" width="950px">
		   	<tr>
		   	    <td class="left_title_1" >专业编号:</td>
		   	    <td class="left_title_1" >专业名:</td>
		   		<td class="left_title_1">学院名:</td>
		   		<td class="left_title_1">操作</td>
		   	</tr>
		   	<s:iterator value="departments" status="st" id="department">
		   		<tr>
		   		<td class="left_title_2">${code}</td>
		   		<td class="left_title_2">${name}</td>
		   		<td class="left_title_2">${department.institute.name}</td>
		   		<td class="left_title_2">
		   			<s:a href="###" onclick="edit(%{#attr.department.id});">修改</s:a>
					<s:a href="###" onclick="del(%{#attr.department.id});">删除</s:a>
				</td>
		   		</tr>
		   	</s:iterator>
		   	<tr>
		   		
		   	</tr>
		</table>
		</div>
	</body>
</html>